table.RECORDS_DELETED Function

Syntax

Deleted_Records as N = <TBL>.records_deleted()

Description

Returns a count of the records deleted.

Discussion

The <TBL>.RECORDS_DELETED() method returns the number of Deleted_Records in the open table referenced by <TBL>. When records are deleted from a table they are not physically removed from the table. To physically remove deleted records from a table, you must pack the table using the <TBL>.PACK() method.

This script packs the table to remove any space taken up by deleted records.

tbl = table.open("c:\a5\a_sports\customer.dbf")
deleted_count = tbl.records_deleted()
if deleted_count > 0 then
    tbl.pack()
end if

See Also